package cn.shop.dys.widget;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;

/**
 * 不能滑动vp
 * Created by sunjian on 2016/4/8.
 */
public class NoScrollViewPager extends ViewPager{
    private OnViewPagerScrollListener listener;

    public NoScrollViewPager(Context context) {
        this(context, null);
    }

    public NoScrollViewPager(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent ev) {
        return false;
    }

    @Override
    public boolean onTouchEvent(MotionEvent ev) {
        return false;
    }

    public void setOnViewPagerScrollListener(OnViewPagerScrollListener listener){
        this.listener=listener;
    }
    public interface OnViewPagerScrollListener{
        boolean isScroll();
    }
}
